/*
 * Commande.h
 *
 *  Created on: 19 nov. 2012
 *      Author: aboursie - potier
 */

#ifndef COMMANDE_H_
#define COMMANDE_H_

#include <map>
#include <string>
#include <stack>
#include <vector>
#include <iostream>

using namespace std;

class Commande {
public:

	static map<string, Commande*> commandes;
	static stack<Commande*> pile;

	class CommandeException {
	};

	virtual Commande* constructeurVirtuel();
	virtual void execute();
	virtual void desexecute();
	virtual bool initialiserArguments(vector<string> args) = 0;
	static Commande* nouvelleCommande(string s) {
		return commandes[s]->constructeurVirtuel();
	}
};

#endif /* COMMANDE_H_ */
